<?php
	class Homepage_model extends CI_Model
	{
		public function __construct()
		{
			parent::__construct();
		}
		public function getRows($tb)
		{

		}
                public function getNews_all()
		{
			$rs = $this->db->query("SELECT * FROM NEWS");
//                    echo "first: ".$row_first." , last: ".$row_last;
			return 	$rs;
                }
                
                public function getNews($rf,$rl)
		{
			$rs = $this->db->query("SELECT * FROM NEWS ORDER BY ID_NEW DESC LIMIT $rf , $rl");
//                    echo "first: ".$row_first." , last: ".$row_last;
			return 	$rs;
                }
                
                public function getReadNews($id)
                {
                        $rs = $this->db->query("SELECT * FROM NEWS WHERE id_new = '$id'");
                        return $rs;
                }
                
                public function getMember($user_login)
                {
			$rs = $this->db->query("select * from member_sl where user='$user_login'");
			return 	$rs;                    
                }
                
                public function getCheckAdmin($u,$p)
                {
                    $rs = $this->db->query("select * from admin_sl where user='$u' and password='$p'");
                    return $rs;
                }
	}
?>